Skip to content

Conversation

@quike
Copy link

@quike quike commented Apr 28, 2025

This change is for #2034

@quike quike requested a review from a team as a code owner April 28, 2025 14:16
export function getInput(name: string, options?: InputOptions): string {
const val: string =
process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''
process.env[`INPUT_${name.replace(/[- ]/g, '_').toUpperCase()}`] || ''
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break many test setups that define, say, process.env.["INPUT_WHO-TO-GREET"]. You need some code to maintain backwards-compatibility, i.e.

process.env[`INPUT_${name.replace(/[- ]/g, '_').toUpperCase()}`] ||
process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''

Having said that, I have yet to see any actions/ PR getting accepted when the PR author doesn't happen to work at GitHub. I don't understand the policy (at least I assume that there is an internal, not publicly communicated, policy not to accept "outside PRs"...) but that's what I have observed in the past. Not trying to spoil the party here, but wanting to dampen both your and my hopes to reflect realistic expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants